package com.wechat.backend.controller;

import com.wechat.backend.service.SessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/session")
public class SessionController {

    @Autowired
    private SessionService sessionService;

    @GetMapping("/list")
    public List<Map<String, Object>> getSessionList(@RequestParam Integer userId) {
        return sessionService.getSessionList(userId);
    }
} 